

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/fluid.png">
  <link rel="icon" href="/img/fluid.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="XiaoMaDing">
  <meta name="keywords" content="">
  
    <meta name="description" content="前言在一些小的软件公司，需求功能开发没有规范、固定的流程，可能运营、老板等随便口述一下需求内容，研发人员就开始撸代码，一些简单的改动可以这样做，那么如果稍微复杂一点的需求，也这样做会造成哪些问题尼？  低效的开发过程：如果不提前评估内部功能清单、实现细节、外部依赖，直接上手撸代码，可能写到一半，发现这个方案实现不了，就可能会造成项目延期风险 风险和质量问题：如果不提前进行需求分析、评估改动内容、技">
<meta property="og:type" content="article">
<meta property="og:title" content="软件开发：技术方案">
<meta property="og:url" content="http://example.com/2022/05/06/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/index.html">
<meta property="og:site_name" content="剑出">
<meta property="og:description" content="前言在一些小的软件公司，需求功能开发没有规范、固定的流程，可能运营、老板等随便口述一下需求内容，研发人员就开始撸代码，一些简单的改动可以这样做，那么如果稍微复杂一点的需求，也这样做会造成哪些问题尼？  低效的开发过程：如果不提前评估内部功能清单、实现细节、外部依赖，直接上手撸代码，可能写到一半，发现这个方案实现不了，就可能会造成项目延期风险 风险和质量问题：如果不提前进行需求分析、评估改动内容、技">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/index_img/book.png">
<meta property="article:published_time" content="2022-05-06T04:37:59.000Z">
<meta property="article:modified_time" content="2023-12-26T03:48:16.453Z">
<meta property="article:author" content="XiaoMaDing">
<meta property="article:tag" content="软件开发">
<meta property="article:tag" content="需求分析">
<meta property="article:tag" content="技术方案">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="http://example.com/index_img/book.png">
  
  
    <meta name="referrer" content="no-referrer-when-downgrade">
  
  
  <title>软件开发：技术方案 - 剑出</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.9.5-a","typing":{"enable":true,"typeSpeed":40,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"left","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":4},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":true,"follow_dnt":false,"baidu":"e0dcc0c9ab8f117bb83579322e04efb8","google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml","include_content_in_search":true};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  

  
    <!-- Baidu Analytics -->
    <script async>
      if (!Fluid.ctx.dnt) {
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?e0dcc0c9ab8f117bb83579322e04efb8";
          var s = document.getElementsByTagName("script")[0];
          s.parentNode.insertBefore(hm, s);
        })();
      }
    </script>
  

  

  

  

  

  



  
<meta name="generator" content="Hexo 6.3.0"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 60vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>剑出</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/yuzhou.gif') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="软件开发：技术方案"></span>
          
        </div>

        
          
  <div class="mt-3">
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2022-05-06 12:37" pubdate>
          2022年5月6日 下午
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          2.8k 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          24 分钟
        
      </span>
    

    
    
      
        <span id="busuanzi_container_page_pv" style="display: none">
          <i class="iconfont icon-eye" aria-hidden="true"></i>
          <span id="busuanzi_value_page_pv"></span> 次
        </span>
        
      
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="padding-left: 2rem; margin-right: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <h1 id="seo-header">软件开发：技术方案</h1>
            
              <p class="note note-info">
                
                  
                    本文最后更新于：7 个月前
                  
                
              </p>
            
            
              <div class="markdown-body">
                
                <h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>在一些小的软件公司，需求功能开发没有规范、固定的流程，可能运营、老板等随便口述一下需求内容，研发人员就开始撸代码，一些简单的改动可以这样做，那么如果稍微复杂一点的需求，也这样做会造成哪些问题尼？</p>
<ol>
<li>低效的开发过程：如果不提前评估内部功能清单、实现细节、外部依赖，直接上手撸代码，可能写到一半，发现这个方案实现不了，就可能会造成项目延期风险</li>
<li>风险和质量问题：如果不提前进行需求分析、评估改动内容、技术实现、技术兼容、测试范围，可能会造成代码写完了，才发现和产品经理的需求南辕北辙，甚至推倒重来；也可能未评估到对已有功能的兼容性影响，结果本次功能是完成了，结果其他功能没法用了。</li>
<li>可维护性和扩展性问题：一个需求可能经过长时间的迭代，如果每次迭代都没有技术方案，那对于后续的维护、扩展，是致命的，经过几个月后，可能自己都已经忘记了当初为什么要这样干，更不用说是别人来接手。</li>
<li>沟通和合作困难：如果一个需求需要多人，甚至跨团队的协作，没有技术方案，沟通会变得异常困难，全靠口口相传，可能产生严重后果。比如：你和上游定义了1个API的结构，结果到联调时，发现上游并不是按照约定来提供的，此时上游说当时就是这样沟通的，互相推诿扯皮，导致项目延期。</li>
</ol>
<p>虽然不写技术方案，确实有很多弊端，但即便是博主我自己，在之前待过的几家公司，在做需求的时候，都没有技术方案设计、评审这些环节。在产品经理将需求讲解完毕，就直接加入代码开发了。直到后面进入了一家稍微大型点的公司，对需求开发生命周期有着较为标准、严格的标准，才有了技术方案这个东西。</p>
<p>那么有些需求工期紧、开发任务重；有些需求又过于简单，可能只改动了一句代码；到底该怎么看待技术方案尼？</p>
<h1 id="when？"><a href="#when？" class="headerlink" title="when？"></a>when？</h1><p>什么时候该写技术方案尼？</p>
<p>1、项目工时超过了 xx 人&#x2F;天，必须写技术方案 （我司规定超过了1人天，则必须有技术方案）</p>
<p>2、代码改动小，但业务影响范围广，需要写技术方案：评估影响面、测试范围、风险、灰度&#x2F;应急方案</p>
<p>3、工时短，但涉及到兼容问题，需要写技术方案。比如：MQ的结构需要变化，就要考虑到新老MQ消息体如何兼容</p>
<p>. . .</p>
<h1 id="how？"><a href="#how？" class="headerlink" title="how？"></a>how？</h1><p>那到底应该怎么写技术方案尼？下面结合博主工作经验，以其中1个实际项目给出示例</p>
<h1 id="礼品卡-清结算侧技术方案"><a href="#礼品卡-清结算侧技术方案" class="headerlink" title="礼品卡-清结算侧技术方案"></a>礼品卡-清结算侧技术方案</h1><h2 id="概述及术语"><a href="#概述及术语" class="headerlink" title="概述及术语"></a>概述及术语</h2><p>对一些系统中产生的术语做出解释</p>
<table>
<thead>
<tr>
<th><strong>名词列表</strong></th>
<th><strong>名词含义</strong></th>
<th><strong>说明</strong></th>
</tr>
</thead>
<tbody><tr>
<td>礼品卡</td>
<td>用户可以购买礼品卡赠送给好友，好友通过卡片去线下网点兑换商品</td>
<td></td>
</tr>
</tbody></table>
<h2 id="1-需求背景"><a href="#1-需求背景" class="headerlink" title="1 需求背景"></a>1 需求背景</h2><p>可以引用产品文档，并且带上产品文档链接。</p>
<p>需求文档地址：xxx</p>
<h3 id="业务背景"><a href="#业务背景" class="headerlink" title="业务背景"></a>业务背景</h3><p>根据每年的节日与营销节点，将全年时间划分为6段主题营销：</p>
<ol>
<li>配合营销节点，设计不同主题的卡面样式。</li>
<li>同时配合营销节点的礼品卡销售，搭配进行主题传播推广。</li>
</ol>
<table>
<thead>
<tr>
<th><strong>活动周期</strong></th>
<th><strong>营销节点</strong></th>
<th><strong>方向主题</strong></th>
<th><strong>卡面设计</strong></th>
</tr>
</thead>
<tbody><tr>
<td>1-2月</td>
<td>春节</td>
<td>过年、团圆</td>
<td>根据节点营销主题进行卡面设计与呈现</td>
</tr>
<tr>
<td>3-4月</td>
<td>龙抬头</td>
<td>祈福、好运</td>
<td></td>
</tr>
<tr>
<td>5-6月</td>
<td>端午</td>
<td>团圆、祈福</td>
<td></td>
</tr>
<tr>
<td>6月</td>
<td>父亲节</td>
<td>限时、祝福</td>
<td></td>
</tr>
<tr>
<td>7-8月</td>
<td>毕业季+调酒节</td>
<td>升学、谢师、调酒节主题</td>
<td></td>
</tr>
<tr>
<td>9月</td>
<td>中秋</td>
<td>团圆、祈福</td>
<td></td>
</tr>
<tr>
<td>10月</td>
<td>国庆+重阳节</td>
<td>限时、祝福</td>
<td></td>
</tr>
<tr>
<td>11~12月</td>
<td>涨价节</td>
<td>涨价节主题</td>
<td></td>
</tr>
</tbody></table>
<h3 id="业务目标"><a href="#业务目标" class="headerlink" title="业务目标"></a>业务目标</h3><p>O：通过礼品卡的社交属性，提升动销</p>
<p>KR1：达到1000万的动销额</p>
<p>KR2：达到1.1万用户数量</p>
<h2 id="2-业务分析"><a href="#2-业务分析" class="headerlink" title="2 业务分析"></a>2 业务分析</h2><h3 id="业务流程"><a href="#业务流程" class="headerlink" title="业务流程"></a>业务流程</h3><p>说明：业务整体流程，和系统业务流程区别，这里不关系系统，只关心纯业务流。</p>
<h3 id="业务用例"><a href="#业务用例" class="headerlink" title="业务用例"></a>业务用例</h3><p>说明：将本次改造拆分为一个一个功能点，然后每个功能点下面再拆出对应的用例。谁？何时？何地？干了事情？</p>
<img src="/2022/05/06/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/image-20230606144507168.png" srcset="/img/loading.gif" lazyload alt="image-20230606144507168" style="zoom:100%;"> 



<h2 id="3-系统分析"><a href="#3-系统分析" class="headerlink" title="3 系统分析"></a>3 系统分析</h2><h3 id="系统用例"><a href="#系统用例" class="headerlink" title="系统用例"></a>系统用例</h3><img src="/2022/05/06/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/image-20230606145228932.png" srcset="/img/loading.gif" lazyload alt="image-20230606145228932" style="zoom:80%;"> 



<h3 id="内部功能清单"><a href="#内部功能清单" class="headerlink" title="内部功能清单"></a>内部功能清单</h3><table>
<thead>
<tr>
<th><strong>序号</strong></th>
<th><strong>功能点</strong></th>
<th><strong>修改类型</strong></th>
<th><strong>功能描述</strong></th>
<th><strong>开发者</strong></th>
</tr>
</thead>
<tbody><tr>
<td>1</td>
<td>消费者买卡</td>
<td>新增</td>
<td>消费者买卡时，将买卡的货款实时转账给购买网点的店老板</td>
<td>小马</td>
</tr>
<tr>
<td>2</td>
<td>消费者兑换商品</td>
<td>新增</td>
<td>消费者使用礼品卡去线下网点兑换商品时，给线下网点计算&#x2F;发放返利</td>
<td>小马</td>
</tr>
<tr>
<td>3</td>
<td>店老板返利查询</td>
<td>新增</td>
<td>店老板在商家后台查看返利到账情况</td>
<td>小张</td>
</tr>
</tbody></table>
<h3 id="依赖方功能清单"><a href="#依赖方功能清单" class="headerlink" title="依赖方功能清单"></a>依赖方功能清单</h3><table>
<thead>
<tr>
<th><strong>序号</strong></th>
<th><strong>依赖系统</strong></th>
<th><strong>功能点</strong></th>
<th><strong>功能描述</strong></th>
<th><strong>修改类型</strong></th>
<th><strong>对接人</strong></th>
</tr>
</thead>
<tbody><tr>
<td>1</td>
<td>订单</td>
<td>消费者买卡</td>
<td>消费者购买礼品卡时，发送MQ通知</td>
<td>新增</td>
<td>小王</td>
</tr>
<tr>
<td>2</td>
<td>订单</td>
<td>消费者兑换商品</td>
<td>消费者使用礼品卡兑换商品时，发送MQ通知</td>
<td>新增</td>
<td>小王</td>
</tr>
</tbody></table>
<h2 id="4-架构设计"><a href="#4-架构设计" class="headerlink" title="4 架构设计"></a>4 架构设计</h2><p>说明：讲清楚业务架构、应用架构，二选一。即使是小迭代架构不变也需要引用之前的架构图。</p>
<h3 id="整体架构"><a href="#整体架构" class="headerlink" title="整体架构"></a>整体架构</h3><img src="/2022/05/06/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/image-20230606162418206.png" srcset="/img/loading.gif" lazyload alt="image-20230606162418206" style="zoom:100%;">  



<h3 id="核心功能流程图-时序图"><a href="#核心功能流程图-时序图" class="headerlink" title="核心功能流程图&#x2F;时序图"></a>核心功能流程图&#x2F;时序图</h3><h4 id="1、消费者买卡"><a href="#1、消费者买卡" class="headerlink" title="1、消费者买卡"></a>1、消费者买卡</h4><img src="/2022/05/06/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/image-20230606150738944.png" srcset="/img/loading.gif" lazyload alt="image-20230606150738944" style="zoom:80%;">  



<h4 id="2、消费者兑换商品"><a href="#2、消费者兑换商品" class="headerlink" title="2、消费者兑换商品"></a>2、消费者兑换商品</h4><img src="/2022/05/06/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/image-20230606152031660.png" srcset="/img/loading.gif" lazyload alt="image-20230606152031660" style="zoom:80%;"> 



<h2 id="4-模型设计"><a href="#4-模型设计" class="headerlink" title="4 模型设计"></a>4 模型设计</h2><h3 id="状态机"><a href="#状态机" class="headerlink" title="状态机"></a>状态机</h3><img src="/2022/05/06/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/image-20230606155957205.png" srcset="/img/loading.gif" lazyload alt="image-20230606155957205" style="zoom:80%;"> 



<h3 id="数据模型"><a href="#数据模型" class="headerlink" title="数据模型"></a>数据模型</h3><img src="/2022/05/06/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/image-20230606153112382.png" srcset="/img/loading.gif" lazyload alt="image-20230606153112382" style="zoom:80%;"> 

<h2 id="5-接口详细设计"><a href="#5-接口详细设计" class="headerlink" title="5 接口详细设计"></a>5 接口详细设计</h2><p>说明：接口入参、出参字段、错误码、实现的逻辑描述、接口变更的影响范围</p>
<h3 id="1、消费者买卡-1"><a href="#1、消费者买卡-1" class="headerlink" title="1、消费者买卡"></a>1、消费者买卡</h3><p>□ 监听订单场景：</p>
<figure><div class="code-wrapper"><pre class="line-numbers language-none"><code class="language-none">CLOUD_BUY_CARD(600, &quot;CLOUD_BUY_CARD&quot;, &quot;云店购买提货卡&quot;)<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div></figure>

<p>□ 监听订单状态：支付成功</p>
<p>□  Topic：<code>ORDER_STATE_CHANGED</code></p>
<p>□ MQ结构：</p>
<figure><div class="code-wrapper"><pre class="line-numbers language-json" data-language="json"><code class="language-json"><span class="token punctuation">&#123;</span>
	<span class="token property">"orderId"</span><span class="token operator">:</span> <span class="token string">"订单id"</span><span class="token punctuation">,</span>
	<span class="token property">"sceneCode"</span><span class="token operator">:</span> <span class="token string">"CLOUD_BUY_CARD"</span><span class="token punctuation">,</span>
	<span class="token property">"state"</span><span class="token operator">:</span> <span class="token string">"支付成功"</span><span class="token punctuation">,</span>
	<span class="token property">"orderTime"</span><span class="token operator">:</span> <span class="token string">"2022-10-10 17:23:01"</span><span class="token punctuation">,</span>
	<span class="token property">"payTime"</span><span class="token operator">:</span> <span class="token string">"2022-10-10 17:23:01"</span><span class="token punctuation">,</span>
	<span class="token property">"pointId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
	<span class="token property">"uniqueId"</span><span class="token operator">:</span> <span class="token string">"订单id"</span><span class="token punctuation">,</span>
	<span class="token property">"skuList"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">&#123;</span>
		<span class="token property">"skuId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
		<span class="token property">"qty"</span><span class="token operator">:</span> <span class="token number">0.00</span><span class="token punctuation">,</span>
		<span class="token property">"currentQty"</span><span class="token operator">:</span> <span class="token number">0.00</span><span class="token punctuation">,</span>
		<span class="token property">"salePrice"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
		<span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">""</span>
	<span class="token punctuation">&#125;</span><span class="token punctuation">]</span>
<span class="token punctuation">&#125;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div></figure>



<h3 id="2、消费者兑换商品-1"><a href="#2、消费者兑换商品-1" class="headerlink" title="2、消费者兑换商品"></a>2、消费者兑换商品</h3><p>□ 监听订单场景：</p>
<figure><div class="code-wrapper"><pre class="line-numbers language-none"><code class="language-none">CLOUD_CARD_EXCHANGE_OFFLINE(601, &quot;CLOUD_CARD_EXCHANGE_OFFLINE&quot;, &quot;云店线下卡兑换酒&quot;)<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></div></figure>

<p>□ 监听订单状态：完成</p>
<p>□  Topic：<code>ORDER_STATE_CHANGED</code></p>
<p>□  MQ结构：</p>
<figure><div class="code-wrapper"><pre class="line-numbers language-json" data-language="json"><code class="language-json"><span class="token punctuation">&#123;</span>
	<span class="token property">"orderId"</span><span class="token operator">:</span> <span class="token string">"订单id"</span><span class="token punctuation">,</span>
	<span class="token property">"sceneCode"</span><span class="token operator">:</span> <span class="token string">"CLOUD_CARD_EXCHANGE_OFFLINE"</span><span class="token punctuation">,</span>
	<span class="token property">"state"</span><span class="token operator">:</span> <span class="token string">"兑换完成"</span><span class="token punctuation">,</span>
	<span class="token property">"orderTime"</span><span class="token operator">:</span> <span class="token string">"2022-10-10 17:23:01"</span><span class="token punctuation">,</span>
	<span class="token property">"payTime"</span><span class="token operator">:</span> <span class="token string">"2022-10-10 17:23:01"</span><span class="token punctuation">,</span>
	<span class="token property">"pointId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
	<span class="token property">"uniqueId"</span><span class="token operator">:</span> <span class="token string">"目前必须一次性提完,则为订单id )后续如果分批提，则给每次提货的id)"</span><span class="token punctuation">,</span>
	<span class="token property">"skuList"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">&#123;</span>
		<span class="token property">"skuId"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
		<span class="token property">"qty"</span><span class="token operator">:</span> <span class="token number">0.00</span><span class="token punctuation">,</span>
		<span class="token property">"currentQty"</span><span class="token operator">:</span> <span class="token number">0.00</span><span class="token punctuation">,</span>
		<span class="token property">"salePrice"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
		<span class="token property">"mixContractId"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
		<span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
		<span class="token property">"codeInfoList"</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token punctuation">&#123;</span>
			<span class="token property">"code"</span><span class="token operator">:</span> <span class="token string">"http://q.xxx.cn/t/?h=_4jlhc0bg08e1"</span><span class="token punctuation">,</span>
			<span class="token property">"codeType"</span><span class="token operator">:</span> <span class="token string">"PURCHASE"</span><span class="token punctuation">,</span>
		<span class="token punctuation">&#125;</span><span class="token punctuation">]</span>
	<span class="token punctuation">&#125;</span><span class="token punctuation">]</span>
<span class="token punctuation">&#125;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre></div></figure>



<h2 id="6-其他方面"><a href="#6-其他方面" class="headerlink" title="6 其他方面"></a>6 其他方面</h2><h3 id="兼容性分析"><a href="#兼容性分析" class="headerlink" title="兼容性分析"></a>兼容性分析</h3><p>说明：主要分为新老代码兼容、新老数据兼容，具体包括但不限于前后端兼容、发布兼容、数据变更兼容、接口兼容、数据序列化和反序列化的兼容等。</p>
<h3 id="灰度方案"><a href="#灰度方案" class="headerlink" title="灰度方案"></a>灰度方案</h3><ol>
<li><p>灰度是系统平滑升级的必要条件</p>
</li>
<li><p>灰度方案需要找准灰度的特征属性，常用的如：区域、人员id</p>
</li>
</ol>
<p>灰度：由订单侧从入口进行灰度控制</p>
<h3 id="监控方案"><a href="#监控方案" class="headerlink" title="监控方案"></a>监控方案</h3><img src="/2022/05/06/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/image-20230606160517204.png" srcset="/img/loading.gif" lazyload alt="image-20230606160517204" style="zoom:80%;"> 



<h3 id="应急方案"><a href="#应急方案" class="headerlink" title="应急方案"></a>应急方案</h3><img src="/2022/05/06/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/image-20230606154025828.png" srcset="/img/loading.gif" lazyload alt="image-20230606154025828" style="zoom:80%;">  

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/%E5%BC%80%E5%8F%91/" class="category-chain-item">开发</a>
  
  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91/" class="print-no-link">#软件开发</a>
      
        <a href="/tags/%E9%9C%80%E6%B1%82%E5%88%86%E6%9E%90/" class="print-no-link">#需求分析</a>
      
        <a href="/tags/%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/" class="print-no-link">#技术方案</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>软件开发：技术方案</div>
      <div>http://example.com/2022/05/06/软件开发：技术方案/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>XiaoMaDing</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2022年5月6日</div>
        </div>
      
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a class="print-no-link" target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2022/05/07/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%EF%BC%9A%E5%8F%91%E5%B8%83%E6%B8%85%E5%8D%95/" title="软件开发：发布清单">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">软件开发：发布清单</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                  </article>
                </div>
              
            </div>

            
  
  
    <article id="comments" lazyload>
      
  <div id="valine"></div>
  <script type="text/javascript">
    Fluid.utils.loadComments('#valine', function() {
      Fluid.utils.createScript('https://lib.baomitu.com/valine/1.5.1/Valine.min.js', function() {
        var options = Object.assign(
          {"appId":"fwhgdRnxBMBQuwXd6G2KY7uA-gzGzoHsz","appKey":"wz9qgHwvuMw8Y0yXAvL1KEr4","path":"window.location.pathname","placeholder":null,"avatar":"retro","meta":["nick","mail","link"],"requiredFields":[],"pageSize":10,"lang":"zh-CN","highlight":false,"recordIP":false,"serverURLs":"","emojiCDN":null,"emojiMaps":null,"enableQQ":false},
          {
            el: "#valine",
            path: window.location.pathname
          }
        )
        new Valine(options);
        Fluid.utils.waitElementVisible('#valine .vcontent', () => {
          var imgSelector = '#valine .vcontent img:not(.vemoji)';
          Fluid.plugins.imageCaption(imgSelector);
          Fluid.plugins.fancyBox(imgSelector);
        })
      });
    });
  </script>
  <noscript>Please enable JavaScript to view the comments</noscript>


    </article>
  


          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      

    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
    </div>
  
  
    <div class="statistics">
  
  

  
    
      <span id="busuanzi_container_site_pv" style="display: none">
        总访问量 
        <span id="busuanzi_value_site_pv"></span>
         次
      </span>
    
    
      <span id="busuanzi_container_site_uv" style="display: none">
        总访客数 
        <span id="busuanzi_value_site_uv"></span>
         人
      </span>
    
    
  
</div>

  
  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>




  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.18.2/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script  src="https://lib.baomitu.com/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.js" ></script>

  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/js/local-search.js" ></script>

  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
